﻿<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
  xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
  xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
  xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
  xmlns:system="clr-namespace:System;assembly=mscorlib">

	<!-- ******MAIN PAGE STYLES****** -->
	<!-- **************************** -->
	<!-- Primary Color Brushes -->
	<SolidColorBrush x:Key="NavigationBackgroundColorBrush" Color="#FF484848"/>
	<SolidColorBrush x:Key="NavigationForegroundColorBrush" Color="#FFFFFFFF"/>
	<SolidColorBrush x:Key="HighLightColorBrush" Color="#FF0097FC"/>
	<SolidColorBrush x:Key="HoverHyperlinkForegroundColorBrush" Color="#FFEBF7FF"/>
	<SolidColorBrush x:Key="HoverHyperLinkBackgroundColorBrush" Color="#FF747474"/>
	<SolidColorBrush x:Key="BodyTextColorBrush" Color="#FF313131"/>

	<!-- LayoutRoot Grid Style -->
	<Style x:Key="LayoutRootGridStyle" TargetType="Grid">
		<Setter Property="Background" Value="#FFFFFFFF"/>
	</Style>

	<!-- Content Border Style -->
	<Style x:Key="ContentBorderStyle" TargetType="Border">
		<Setter Property="Background">
			<Setter.Value>
				<LinearGradientBrush EndPoint="0.5,0.045" StartPoint="0.5,0">
					<GradientStop Color="#6FCCCCCC"/>
					<GradientStop Color="#00CCCCCC" Offset="1"/>
				</LinearGradientBrush>
			</Setter.Value>
		</Setter>
		<Setter Property="BorderBrush" Value="#FFFFFFFF"/>
		<Setter Property="BorderThickness" Value="0,3,0,0"/>
		<Setter Property="Margin" Value="0,42,0,0"/>
		<Setter Property="VerticalAlignment" Value="Stretch"/>
		<Setter Property="HorizontalAlignment" Value="Stretch"/>
	</Style>

	<!-- Content Frame Style -->
	<Style x:Key="ContentFrameStyle" TargetType="navigation:Frame">
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="BorderBrush" Value="Transparent"/>
		<Setter Property="Padding" Value="58,15,58,15"/>
		<Setter Property="VerticalContentAlignment" Value="Stretch"/>
		<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
	</Style>

	<!-- Navigation Grid Style -->
	<Style x:Key="NavigationGridStyle" TargetType="Grid">
		<Setter Property="Background" Value="{StaticResource NavigationBackgroundColorBrush}"/>
		<Setter Property="Height" Value="42"/>
		<Setter Property="Margin" Value="0"/>
		<Setter Property="VerticalAlignment" Value="Top"/>
	</Style>

	<!-- Branding Border Style -->
	<Style x:Key="BrandingBorderStyle" TargetType="Border">
		<Setter Property="Height" Value="42"/>
		<Setter Property="Margin" Value="25,0,25,0"/>
		<Setter Property="VerticalAlignment" Value="Top"/>
		<Setter Property="HorizontalAlignment" Value="Left"/>
	</Style>

	<!-- Branding StackPanel Style -->
	<Style x:Key="BrandingStackPanelStyle" TargetType="StackPanel">
		<Setter Property="HorizontalAlignment" Value="Left"/>
		<Setter Property="Orientation" Value="Horizontal"/>
	</Style>

	<!-- Logo Path Style -->
	<Style x:Key="LogoIcon" TargetType="ContentControl">
		<Setter Property="Height" Value="24"/>
		<Setter Property="Width" Value="24"/>
		<Setter Property="Margin" Value="0,1,10,0"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="ContentControl">
					<Grid>
						<Path UseLayoutRounding='False' Fill="{StaticResource HighLightColorBrush}" Stretch="Fill" Data="M8,0 C12.417931,2.8898596E-06 16,3.5814998 16,8 C16,12.417819 12.41803,16 8,16 C3.5816212,16 6.1398991E-06,12.417912 0,8 C1.5351338E-06,6.8954077 0.22386749,5.8431153 0.62867981,4.8860393 C0.65398115,4.82622 0.6799894,4.7667723 0.70669389,4.7077074 L0.73170543,4.6541386 L5.6357112,9.5581446 L3.7429986,11.450858 L3.7429986,11.493001 L11.669835,11.493001 L11.669835,3.5661643 L11.627691,3.5661643 L9.7349787,5.4588776 L4.8993444,0.62324351 L5.0666013,0.55490673 C5.5510159,0.36389247 6.0585575,0.21878535 6.5838675,0.12495131 C6.8465204,0.078035071 7.1136146,0.043936942 7.3844767,0.023327276 C7.5199089,0.013022465 7.6562829,0.0060896641 7.7935166,0.0026129775 C7.862133,0.00087448902 7.9309645,4.5157563E-08 8,0 z"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!-- ApplicationName Style -->
	<Style x:Key="ApplicationNameStyle" TargetType="TextBlock">
		<Setter Property="Foreground" Value="{StaticResource NavigationForegroundColorBrush}"/>
		<Setter Property="FontSize" Value="14"/>
		<Setter Property="FontWeight" Value="Bold"/>
		<Setter Property="Margin" Value="0,2,0,0"/>
		<Setter Property="VerticalAlignment" Value="Center"/>
		<Setter Property="Effect">
			<Setter.Value>
				<DropShadowEffect BlurRadius="10" Opacity="0.25" ShadowDepth="0"/>
			</Setter.Value>
		</Setter>
	</Style>

	<!-- Links Border Style -->
	<Style x:Key="LinksBorderStyle" TargetType="Border">
		<Setter Property="Height" Value="42"/>
		<Setter Property="Margin" Value="25,0,25,0"/>
		<Setter Property="HorizontalAlignment" Value="Right"/>
	</Style>

	<!-- Links StackPanel Style -->
	<Style x:Key="LinksStackPanelStyle" TargetType="StackPanel">
		<Setter Property="VerticalAlignment" Value="Center"/>
		<Setter Property="HorizontalAlignment" Value="Left"/>
		<Setter Property="Orientation" Value="Horizontal"/>
	</Style>

	<!-- Link Style -->
	<Style x:Key="LinkStyle" TargetType="HyperlinkButton">
		<Setter Property="Background" Value="{StaticResource HighLightColorBrush}"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="BorderBrush" Value="#FF9D9492"/>
		<Setter Property="Foreground" Value="{StaticResource NavigationForegroundColorBrush}"/>
		<Setter Property="FontSize" Value="12"/>
		<Setter Property="Cursor" Value="Hand"/>
		<Setter Property="MinHeight" Value="28"/>
		<Setter Property="MinWidth" Value="78"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="Padding" Value="8,4,8,4"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="HyperlinkButton">
					<Grid x:Name="ButtonGrid" Cursor="{TemplateBinding Cursor}">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveElementBorder" Storyboard.TargetProperty="(UIElement.Visibility)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveElementBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.95"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.BlurRadius)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="10"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveElementBorder" Storyboard.TargetProperty="(UIElement.Visibility)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveElementBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.8"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.BlurRadius)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="5"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<HorizontalAlignment>Center</HorizontalAlignment>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<VerticalAlignment>Center</VerticalAlignment>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<HorizontalAlignment>Center</HorizontalAlignment>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<VerticalAlignment>Center</VerticalAlignment>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="LinkStates">
								<VisualState x:Name="ActiveLink">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ActiveBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="InactiveLink"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
											<SplineDoubleKeyFrame KeyTime="0" Value="0.35"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(Rectangle.RadiusX)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(Rectangle.RadiusY)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unfocused"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Rectangle x:Name="FocusVisualElement" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="2" Opacity="0" Margin="-1" RadiusX="1" RadiusY="1"/>
						<Border x:Name="ActiveBorder" MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" Opacity="0"/>
						<Border x:Name="ContentBorder" MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}" Opacity="1">
							<ContentPresenter x:Name="ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Opacity="1">
								<ContentPresenter.Effect>
									<DropShadowEffect ShadowDepth="0" Color="#FF484848" Opacity="0.65" BlurRadius="0"/>
								</ContentPresenter.Effect>
							</ContentPresenter>
						</Border>
						<Border x:Name="InteractiveBorder" MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}" Background="{StaticResource HoverHyperLinkBackgroundColorBrush}" BorderThickness="1,1,1,1" Opacity="0" BorderBrush="{StaticResource HoverHyperLinkBackgroundColorBrush}" CornerRadius="1,1,1,1"/>
						<Border x:Name="InteractiveElementBorder" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Visibility="Collapsed">
							<TextBlock x:Name="InteractiveElement" Foreground="{StaticResource HoverHyperlinkForegroundColorBrush}" FontSize="{TemplateBinding FontSize}" FontWeight="{TemplateBinding FontWeight}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Text="{TemplateBinding Content}"/>
						</Border>
						<TextBlock x:Name="DisabledOverlay" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Text="{TemplateBinding Content}" Foreground="#FFAAAAAA" Visibility="Collapsed"/>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!-- Divider Style -->
	<Style x:Key="DividerStyle" TargetType="Rectangle">
		<Setter Property="Fill" Value="#1FFFFFFF"/>
		<Setter Property="Stroke" Value="Transparent"/>
		<Setter Property="Width" Value="1"/>
		<Setter Property="Margin" Value="2,4,2,4"/>
	</Style>

	<!-- ******CONTENT PAGE STYLES****** -->
	<!-- ******************************* -->
	<!-- Page Style -->
	<Style x:Key="PageStyle" TargetType="navigation:Page"/>

	<!-- Page ScrollViewer Style -->
	<Style x:Key="PageScrollViewerStyle" TargetType="ScrollViewer">
		<Setter Property="BorderBrush" Value="Transparent"/>
		<Setter Property="BorderThickness" Value="0,1,0,1"/>
		<Setter Property="Margin" Value="-58,-15,-58,-15"/>
		<Setter Property="Padding" Value="58,0,58,0"/>
		<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
		<Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
	</Style>

	<!-- Content Panel Style -->
	<Style x:Key="ContentPanelStyle" TargetType="StackPanel"/>

	<!-- Header Text Style -->
	<Style x:Key="HeaderTextStyle" TargetType="TextBlock">
		<Setter Property="Foreground" Value="{StaticResource BodyTextColorBrush}"/>
		<Setter Property="FontSize" Value="15"/>
		<Setter Property="FontWeight" Value="Bold"/>
		<Setter Property="TextWrapping" Value="Wrap"/>
		<Setter Property="Margin" Value="0,15,0,4"/>
		<Setter Property="HorizontalAlignment" Value="Left"/>
	</Style>

	<!-- Content Text Style -->
	<Style x:Key="ContentTextStyle" TargetType="TextBlock">
		<Setter Property="Foreground" Value="{StaticResource BodyTextColorBrush}"/>
		<Setter Property="FontSize" Value="12"/>
		<Setter Property="TextWrapping" Value="Wrap"/>
		<Setter Property="Margin" Value="0,2,0,2"/>
		<Setter Property="HorizontalAlignment" Value="Left"/>
	</Style>

	<!-- Page HyperlinkButton Style -->
	<Style x:Key="PageHyperlinkButtonStyle" TargetType="HyperlinkButton">
		<Setter Property="TargetName" Value="_new"/>
		<Setter Property="FontSize" Value="12"/>
		<Setter Property="VerticalAlignment" Value="Center"/>
	</Style>
	<ControlTemplate x:Key="CommonValidationToolTipTemplate" TargetType="ToolTip">
		<Grid
          x:Name="Root"
          Margin="5,0"
          RenderTransformOrigin="0,0"
          Opacity="0">
			<Grid.RenderTransform>
				<TranslateTransform x:Name="Translation" X="-25" />
			</Grid.RenderTransform>
			<vsm:VisualStateManager.VisualStateGroups>
				<vsm:VisualStateGroup Name="OpenStates">
					<vsm:VisualStateGroup.Transitions>
						<vsm:VisualTransition GeneratedDuration="0" />
						<vsm:VisualTransition To="Open" GeneratedDuration="0:0:0.2">
							<Storyboard>
								<DoubleAnimation
                                  Storyboard.TargetName="Translation"
                                  Storyboard.TargetProperty="X"
                                  To="0"
                                  Duration="0:0:0.2">
									<DoubleAnimation.EasingFunction>
										<BackEase Amplitude=".3" EasingMode="EaseOut" />
									</DoubleAnimation.EasingFunction>
								</DoubleAnimation>
								<DoubleAnimation
                                  Storyboard.TargetName="Root"
                                  Storyboard.TargetProperty="Opacity"
                                  To="1"
                                  Duration="0:0:0.2" />
							</Storyboard>
						</vsm:VisualTransition>
					</vsm:VisualStateGroup.Transitions>
					<vsm:VisualState x:Name="Closed">
						<Storyboard>
							<DoubleAnimation
                              Storyboard.TargetName="Root"
                              Storyboard.TargetProperty="Opacity"
                              To="0"
                              Duration="0" />
						</Storyboard>
					</vsm:VisualState>
					<vsm:VisualState x:Name="Open">
						<Storyboard>
							<DoubleAnimation
                              Storyboard.TargetName="Translation"
                              Storyboard.TargetProperty="X"
                              To="0"
                              Duration="0" />
							<DoubleAnimation
                              Storyboard.TargetName="Root"
                              Storyboard.TargetProperty="Opacity"
                              To="1"
                              Duration="0" />
						</Storyboard>
					</vsm:VisualState>
				</vsm:VisualStateGroup>
			</vsm:VisualStateManager.VisualStateGroups>

			<Border Margin="4,4,-4,-4" Background="#052A2E31" CornerRadius="5" />
			<Border Margin="3,3,-3,-3" Background="#152A2E31" CornerRadius="4" />
			<Border Margin="2,2,-2,-2" Background="#252A2E31" CornerRadius="3" />
			<Border Margin="1,1,-1,-1" Background="#352A2E31" CornerRadius="2" />

			<Border
              Background="#FFDC000C"
              CornerRadius="2">
				<TextBlock 
                  UseLayoutRounding="false" 
                  Foreground="#FFFFFFFF"
                  Margin="8,4,8,4"
                  MaxWidth="250"
                  TextWrapping="Wrap"
                  Text="{Binding (Validation.Errors)[0].Exception.Message}" />
			</Border>
		</Grid>
	</ControlTemplate>

	<Style x:Key="ConnectingLinesTreeView" TargetType="controls:TreeView">
		<Setter Property="Background" Value="#FFFFFFFF" />
		<Setter Property="Foreground" Value="#FF000000" />
		<Setter Property="HorizontalContentAlignment" Value="Left" />
		<Setter Property="VerticalContentAlignment" Value="Top" />
		<Setter Property="Cursor" Value="Arrow" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="Padding" Value="1" />
		<Setter Property="BorderBrush" Value="#FF000000" />
		<Setter Property="IsTabStop" Value="True" />
		<Setter Property="TabNavigation" Value="Once" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:TreeView">
					<Grid>
						<vsm:VisualStateManager.VisualStateGroups>
							<vsm:VisualStateGroup x:Name="CommonStates">
								<vsm:VisualState x:Name="Normal" />
								<vsm:VisualState x:Name="MouseOver" />
								<vsm:VisualState x:Name="Pressed" />
								<vsm:VisualState x:Name="Disabled" />
							</vsm:VisualStateGroup>
							<vsm:VisualStateGroup x:Name="FocusStates">
								<vsm:VisualState x:Name="Unfocused" />
								<vsm:VisualState x:Name="Focused" />
							</vsm:VisualStateGroup>
							<vsm:VisualStateGroup x:Name="ValidationStates" >
								<vsm:VisualState x:Name="Valid" />
								<vsm:VisualState x:Name="InvalidUnfocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames
                                          Storyboard.TargetName="Validation"
                                          Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
								<vsm:VisualState x:Name="InvalidFocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames
                                          Storyboard.TargetName="Validation"
                                          Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames
                                          Storyboard.TargetName="ValidationToolTip"
                                          Storyboard.TargetProperty="IsOpen">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<system:Boolean>True</system:Boolean>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
							</vsm:VisualStateGroup>
						</vsm:VisualStateManager.VisualStateGroups>

						<Border
                          BorderBrush="{TemplateBinding BorderBrush}"
                          BorderThickness="{TemplateBinding BorderThickness}"
                          CornerRadius="2">
							<Border                              
                              Padding="{TemplateBinding Padding}"
                              Background="{TemplateBinding Background}"
                              Margin="1">
								<ScrollViewer
                                  x:Name="ScrollViewer"
                                  HorizontalScrollBarVisibility="Auto"
                                  VerticalScrollBarVisibility="Auto"
                                  Background="{x:Null}"
                                  BorderBrush="Transparent"
                                  BorderThickness="0"
                                  IsTabStop="False"
                                  TabNavigation="Once"
                                  toolkit:ScrollViewerExtensions.IsMouseWheelScrollingEnabled="True">
									<Grid Background="{TemplateBinding Background}">
										<ItemsPresenter Margin="5" />
									</Grid>
								</ScrollViewer>
							</Border>
						</Border>

						<Border
                          x:Name="Validation"
                          Grid.Column="1"
                          BorderThickness="{TemplateBinding BorderThickness}"
                          BorderBrush="#FFDB000C"
                          CornerRadius="2"
                          Visibility="Collapsed">
							<ToolTipService.ToolTip>
								<ToolTip
                                  x:Name="ValidationToolTip"
                                  Template="{StaticResource CommonValidationToolTipTemplate}"
                                  Placement="Right"
                                  PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                  DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                  IsHitTestVisible="True" />
							</ToolTipService.ToolTip>
							<Grid
                              Width="10"
                              Height="10"
                              HorizontalAlignment="Right"
                              Margin="0,-4,-4,0"
                              VerticalAlignment="Top"
                              Background="Transparent">
								<Path Margin="-1,3,0,0" Fill="#FFDC000C" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 Z" />
								<Path Margin="-1,3,0,0" Fill="#FFFFFFFF" Data="M 0,0 L2,0 L 8,6 L8,8" />
							</Grid>
						</Border>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="ConnectingLinesTreeViewItem" TargetType="controls:TreeViewItem">
		<Setter Property="Padding" Value="3" />
		<Setter Property="HorizontalContentAlignment" Value="Left" />
		<Setter Property="VerticalContentAlignment" Value="Top" />
		<Setter Property="Background" Value="Transparent" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="Cursor" Value="Arrow" />
		<Setter Property="IsTabStop" Value="True" />
		<Setter Property="TabNavigation" Value="Once" />
		<Setter Property="Margin" Value="0 1 0 0" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:TreeViewItem">
					<Grid Background="{x:Null}">
						<vsm:VisualStateManager.VisualStateGroups>
							<vsm:VisualStateGroup x:Name="CommonStates">
								<vsm:VisualState x:Name="Normal" />
								<vsm:VisualState x:Name="MouseOver" />
								<vsm:VisualState x:Name="Pressed" />
								<vsm:VisualState x:Name="Disabled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames
                                          Storyboard.TargetName="Header"
                                          Storyboard.TargetProperty="Foreground"
                                          Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<SolidColorBrush Color="#FF999999" />
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
							</vsm:VisualStateGroup>
							<vsm:VisualStateGroup x:Name="SelectionStates">
								<vsm:VisualState x:Name="Unselected" />
								<vsm:VisualState x:Name="Selected">
									<Storyboard>
										<DoubleAnimation
                                          Storyboard.TargetName="Selection"
                                          Storyboard.TargetProperty="Opacity"
                                          Duration="0"
                                          To=".75" />
									</Storyboard>
								</vsm:VisualState>
								<vsm:VisualState x:Name="SelectedInactive">
									<Storyboard>
										<DoubleAnimation
                                          Storyboard.TargetName="Selection"
                                          Storyboard.TargetProperty="Opacity"
                                          Duration="0"
                                          To=".2" />
										<ColorAnimation
                                          Storyboard.TargetName="SelectionFill"
                                          Storyboard.TargetProperty="Color"
                                          Duration="0"
                                          To="#FF999999" />
										<ColorAnimation
                                          Storyboard.TargetName="SelectionStroke"
                                          Storyboard.TargetProperty="Color"
                                          Duration="0"
                                          To="#FF333333" />
									</Storyboard>
								</vsm:VisualState>
							</vsm:VisualStateGroup>
							<vsm:VisualStateGroup x:Name="HasItemsStates">
								<vsm:VisualState x:Name="HasItems" />
								<vsm:VisualState x:Name="NoItems">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames
                                          Storyboard.TargetName="ExpanderButton"
                                          Storyboard.TargetProperty="Visibility"
                                          Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
							</vsm:VisualStateGroup>
							<vsm:VisualStateGroup x:Name="ExpansionStates">
								<vsm:VisualState x:Name="Collapsed" />
								<vsm:VisualState x:Name="Expanded">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames
                                          Storyboard.TargetName="ItemsHost"
                                          Storyboard.TargetProperty="Visibility"
                                          Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
							</vsm:VisualStateGroup>
							<vsm:VisualStateGroup x:Name="ValidationStates" >
								<vsm:VisualState x:Name="Valid" />
								<vsm:VisualState x:Name="InvalidUnfocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames
                                          Storyboard.TargetName="Validation"
                                          Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
								<vsm:VisualState x:Name="InvalidFocused">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames
                                          Storyboard.TargetName="Validation"
                                          Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames
                                          Storyboard.TargetName="ValidationToolTip"
                                          Storyboard.TargetProperty="IsOpen">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<system:Boolean>True</system:Boolean>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</vsm:VisualState>
							</vsm:VisualStateGroup>
						</vsm:VisualStateManager.VisualStateGroups>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto" />
							<RowDefinition Height="*" />
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="15" />
							<ColumnDefinition Width="Auto" />
							<ColumnDefinition Width="*" />
						</Grid.ColumnDefinitions>

						<Line
                          toolkit:TreeViewConnectingLines.IsHorizontalConnectingLineOf="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneTime}"
                          Grid.ColumnSpan="2"
                          Stroke="Gray"
                          StrokeDashArray="1 1"
                          X1="9"
                          Y1="10"
                          X2="18"
                          Y2="10" />
						<Line
                          toolkit:TreeViewConnectingLines.IsVerticalConnectingLineOf="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneTime}"
                          Grid.Row="1"
                          Grid.Column="1"
                          Stroke="Gray"
                          StrokeDashArray="1 1"
                          X1="8"
                          Y1="-5"
                          X2="8"
                          Y2="0" />

						<ToggleButton
                          x:Name="ExpanderButton"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          IsThreeState="False"
                          IsTabStop="False"
                          TabNavigation="Once"
                          Background="#FF448DCA"
                          BorderThickness="1"
                          toolkit:TreeViewConnectingLines.IsExpanderButtonOf="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneTime}">
							<ToggleButton.BorderBrush>
								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#FFA3AEB9" Offset="0" />
									<GradientStop Color="#FF8399A9" Offset="0.375" />
									<GradientStop Color="#FF718597" Offset="0.375" />
									<GradientStop Color="#FF617584" Offset="1" />
								</LinearGradientBrush>
							</ToggleButton.BorderBrush>
							<ToggleButton.Template>
								<ControlTemplate TargetType="ToggleButton">
									<Grid>
										<vsm:VisualStateManager.VisualStateGroups>
											<vsm:VisualStateGroup x:Name="CommonStates" >
												<vsm:VisualState x:Name="Normal" />
												<vsm:VisualState x:Name="MouseOver">
													<Storyboard>
														<DoubleAnimation
                                                          Storyboard.TargetName="BackgroundOverlay"
                                                          Storyboard.TargetProperty="Opacity"
                                                          Duration="0"
                                                          To="1" />
														<DoubleAnimation
                                                          Storyboard.TargetName="BoxMiddleBackground"
                                                          Storyboard.TargetProperty="Opacity"
                                                          Duration="0"
                                                          To="1" />
														<ColorAnimation
                                                          Storyboard.TargetName="BoxMiddle"
                                                          Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
                                                          Duration="0"
                                                          To="#7FFFFFFF" />
														<ColorAnimation
                                                          Storyboard.TargetName="BoxMiddle"
                                                          Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
                                                          Duration="0"
                                                          To="#CCFFFFFF" />
														<ColorAnimation
                                                          Storyboard.TargetName="BoxMiddle"
                                                          Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
                                                          Duration="0"
                                                          To="#F2FFFFFF" />
													</Storyboard>
												</vsm:VisualState>
												<vsm:VisualState x:Name="Pressed">
													<Storyboard>
														<DoubleAnimation
                                                          Storyboard.TargetName="BackgroundOverlay"
                                                          Storyboard.TargetProperty="Opacity"
                                                          Duration="0"
                                                          To="1" />
														<DoubleAnimation
                                                          Storyboard.TargetName="BoxMiddleBackground"
                                                          Storyboard.TargetProperty="Opacity"
                                                          Duration="0"
                                                          To="1" />
														<ColorAnimation
                                                          Storyboard.TargetName="BoxMiddle"
                                                          Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
                                                          Duration="0"
                                                          To="#6BFFFFFF" />
														<ColorAnimation
                                                          Storyboard.TargetName="BoxMiddle"
                                                          Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
                                                          Duration="0"
                                                          To="#C6FFFFFF" />
														<ColorAnimation
                                                          Storyboard.TargetName="BoxMiddle"
                                                          Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
                                                          Duration="0"
                                                          To="#EAFFFFFF" />
														<ColorAnimation
                                                          Storyboard.TargetName="BoxMiddle"
                                                          Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
                                                          Duration="0"
                                                          To="#F4FFFFFF" />
														<ColorAnimation
                                                          Storyboard.TargetName="BoxMiddle"
                                                          Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
                                                          Duration="0"
                                                          To="#FF6DBDD1" />
														<ColorAnimation
                                                          Storyboard.TargetName="BoxMiddle"
                                                          Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
                                                          Duration="0"
                                                          To="#FF6DBDD1" />
														<ColorAnimation
                                                          Storyboard.TargetName="BoxMiddle"
                                                          Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
                                                          Duration="0"
                                                          To="#FF6DBDD1" />
														<ColorAnimation
                                                          Storyboard.TargetName="BoxMiddle"
                                                          Storyboard.TargetProperty="(Shape.Stroke).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
                                                          Duration="0"
                                                          To="#FF6DBDD1" />
													</Storyboard>
												</vsm:VisualState>
												<vsm:VisualState x:Name="Disabled">
													<Storyboard>
														<DoubleAnimation
                                                          Storyboard.TargetName="DisabledVisualElement"
                                                          Storyboard.TargetProperty="(UIElement.Opacity)"
                                                          Duration="0"
                                                          To="0.55" />
													</Storyboard>
												</vsm:VisualState>
											</vsm:VisualStateGroup>
											<vsm:VisualStateGroup x:Name="CheckStates" >
												<vsm:VisualState x:Name="Checked">
													<Storyboard>
														<DoubleAnimation
                                                          Storyboard.TargetName="UncheckedVisual"
                                                          Storyboard.TargetProperty="(UIElement.Opacity)"
                                                          Duration="0"
                                                          To="0" />
													</Storyboard>
												</vsm:VisualState>
												<vsm:VisualState x:Name="Unchecked">
													<Storyboard>
														<DoubleAnimation
                                                          Storyboard.TargetName="UncheckedVisual"
                                                          Storyboard.TargetProperty="(UIElement.Opacity)"
                                                          Duration="0"
                                                          To="1" />
													</Storyboard>
												</vsm:VisualState>
												<vsm:VisualState x:Name="Indeterminate">
													<Storyboard>
														<DoubleAnimation
                                                          Storyboard.TargetName="UncheckedVisual"
                                                          Storyboard.TargetProperty="(UIElement.Opacity)"
                                                          Duration="0"
                                                          To="0" />
													</Storyboard>
												</vsm:VisualState>
											</vsm:VisualStateGroup>
										</vsm:VisualStateManager.VisualStateGroups>
										<Grid.ColumnDefinitions>
											<ColumnDefinition Width="12" />
										</Grid.ColumnDefinitions>
										<Grid.RowDefinitions>
											<RowDefinition Height="12" />
										</Grid.RowDefinitions>
										<Grid
                                          HorizontalAlignment="Left"
                                          VerticalAlignment="Top">
											<Rectangle
                                              x:Name="Background"
                                              Width="10"
                                              Height="10"
                                              RadiusX="1"
                                              RadiusY="1"
                                              Stroke="{TemplateBinding BorderBrush}"
                                              StrokeThickness="{TemplateBinding BorderThickness}"
                                              Fill="#FFFFFFFF"
                                              Margin="1"  />
											<Rectangle
                                              x:Name="BackgroundOverlay"
                                              Fill="#FFC4DBEE"
                                              Opacity="0"
                                              Width="10"
                                              Height="10"
                                              RadiusX="1"
                                              RadiusY="1"
                                              StrokeThickness="1"
                                              Margin="1"
                                              Stroke="#00000000" />
											<Rectangle
                                              x:Name="BoxMiddleBackground"
                                              Width="8"
                                              Height="8"
                                              RadiusX="1"
                                              RadiusY="1"
                                              Fill="{TemplateBinding Background}"
                                              Stroke="#00000000"
                                              StrokeThickness="1" />
											<Rectangle
                                              x:Name="BoxMiddle"
                                              Width="8"
                                              Height="8"
                                              RadiusX="1"
                                              RadiusY="1"
                                              StrokeThickness="1">
												<Rectangle.Stroke>
													<LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
														<GradientStop Color="#FFFFFFFF" Offset="1" />
														<GradientStop Color="#FFFFFFFF" Offset="0" />
														<GradientStop Color="#FFFFFFFF" Offset="0.375" />
														<GradientStop Color="#FFFFFFFF" Offset="0.375" />
													</LinearGradientBrush>
												</Rectangle.Stroke>
												<Rectangle.Fill>
													<LinearGradientBrush StartPoint="0.62,0.15" EndPoint="0.64,0.88">
														<GradientStop Color="#FFFFFFFF" Offset="0.013" />
														<GradientStop Color="#F9FFFFFF" Offset="0.375" />
														<GradientStop Color="#EAFFFFFF" Offset="0.603" />
														<GradientStop Color="#D8FFFFFF" Offset="1" />
													</LinearGradientBrush>
												</Rectangle.Fill>
											</Rectangle>
											<Rectangle
                                              x:Name="BoxMiddleLine"
                                              Width="8"
                                              Height="8"
                                              RadiusX="1"
                                              RadiusY="1"
                                              Stroke="{TemplateBinding BorderBrush}"
                                              StrokeThickness="1"
                                              Opacity=".2" />
											<Rectangle
                                              Height="2"
                                              Width="6"
                                              Fill="#FF666666" />
											<Rectangle
                                              x:Name="UncheckedVisual"
                                              Height="6"
                                              Width="2"
                                              Fill="#FF666666"
                                              Opacity="1" />
											<Rectangle
                                              x:Name="DisabledVisualElement"
                                              RadiusX="1"
                                              RadiusY="1"
                                              Width="10"
                                              Height="10"
                                              Opacity="0"
                                              Fill="#FFFFFFFF" />
										</Grid>
									</Grid>
								</ControlTemplate>
							</ToggleButton.Template>
						</ToggleButton>

						<Rectangle
                          x:Name="Selection"
                          Grid.Column="1"
                          Opacity="0"
                          StrokeThickness="1"
                          IsHitTestVisible="False"
                          RadiusX="2"
                          RadiusY="2">
							<Rectangle.Fill>
								<SolidColorBrush x:Name="SelectionFill" Color="#FFBADDE9" />
							</Rectangle.Fill>
							<Rectangle.Stroke>
								<SolidColorBrush x:Name="SelectionStroke" Color="#FF6DBDD1" />
							</Rectangle.Stroke>
						</Rectangle>
						<Button
                          x:Name="Header"
                          Grid.Column="1"
                          ClickMode="Hover"
                          Background="{TemplateBinding Background}"
                          Foreground="{TemplateBinding Foreground}"
                          BorderBrush="{TemplateBinding BorderBrush}"
                          BorderThickness="{TemplateBinding BorderThickness}"
                          Cursor="{TemplateBinding Cursor}"
                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                          IsTabStop="False"
                          TabNavigation="Once"
                          toolkit:TreeViewConnectingLines.IsHeaderOf="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=OneTime}">
							<Button.Template>
								<ControlTemplate TargetType="Button">
									<Grid Background="{TemplateBinding Background}">
										<vsm:VisualStateManager.VisualStateGroups>
											<vsm:VisualStateGroup x:Name="CommonStates">
												<vsm:VisualState x:Name="Normal" />
												<vsm:VisualState x:Name="Pressed">
													<Storyboard>
														<DoubleAnimation
                                                          Storyboard.TargetName="Hover"
                                                          Storyboard.TargetProperty="Opacity"
                                                          Duration="0"
                                                          To=".5" />
													</Storyboard>
												</vsm:VisualState>
												<vsm:VisualState x:Name="Disabled">
													<Storyboard>
														<DoubleAnimation
                                                          Storyboard.TargetName="Content"
                                                          Storyboard.TargetProperty="Opacity"
                                                          Duration="0"
                                                          To=".55" />
													</Storyboard>
												</vsm:VisualState>
											</vsm:VisualStateGroup>
										</vsm:VisualStateManager.VisualStateGroups>
										<Rectangle
                                          x:Name="Hover"
                                          Opacity="0"
                                          Fill="#FFBADDE9"
                                          Stroke="#FF6DBDD1"
                                          StrokeThickness="1"
                                          IsHitTestVisible="False"
                                          RadiusX="2"
                                          RadiusY="2" />
										<ContentPresenter
                                          x:Name="Content"
                                          Cursor="{TemplateBinding Cursor}"
                                          Content="{TemplateBinding Content}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          HorizontalAlignment="Left"
                                          Margin="{TemplateBinding Padding}" />
									</Grid>
								</ControlTemplate>
							</Button.Template>
							<Button.Content>
								<ContentPresenter
                                  Content="{TemplateBinding Header}"
                                  ContentTemplate="{TemplateBinding HeaderTemplate}" />
							</Button.Content>
						</Button>

						<Border
                          x:Name="Validation"
                          Grid.Column="1"
                          BorderThickness="{TemplateBinding BorderThickness}"
                          BorderBrush="#FFDB000C"
                          CornerRadius="2"
                          Visibility="Collapsed">
							<ToolTipService.ToolTip>
								<ToolTip
                                  x:Name="ValidationToolTip"
                                  Template="{StaticResource CommonValidationToolTipTemplate}"
                                  Placement="Right"
                                  PlacementTarget="{Binding ElementName=Header}"
                                  DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                  IsHitTestVisible="True" />
							</ToolTipService.ToolTip>
							<Grid
                              Width="10"
                              Height="10"
                              HorizontalAlignment="Right"
                              Margin="0,-4,-4,0"
                              VerticalAlignment="Top"
                              Background="Transparent">
								<Path Margin="-1,3,0,0" Fill="#FFDC000C" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 Z" />
								<Path Margin="-1,3,0,0" Fill="#FFFFFFFF" Data="M 0,0 L2,0 L 8,6 L8,8" />
							</Grid>
						</Border>

						<ItemsPresenter
                          x:Name="ItemsHost"
                          Grid.Row="1"
                          Grid.Column="1"
                          Grid.ColumnSpan="2"
                          Visibility="Collapsed" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>